Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support to search via Lucene query for auth0_user data-source #1141

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

duedares-rvj
Copy link
Contributor

@duedares-rvj duedares-rvj commented Jan 31, 2025

🔧 Changes

auth0_user data-source only supported retrieving a user via user_id. This was not human-friendly.
Added support to specify a lucene query in the data-source and fetch user based on that.

data "auth0_user" "fetch_via_email" {
	query = "email:[email protected]"
}

data "auth0_user" "fetch_via_username" {
	query = "username:test_username"
}

📚 References

Closes #892

🔬 Testing

Relevant test cases has been added and can be run by below command:
make test-acc FILTER=TestAccDataSourceUser

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2025

Codecov Report

Attention: Patch coverage is 82.35294% with 6 lines in your changes missing coverage. Please review.

Project coverage is 89.19%. Comparing base (32cef5c) to head (fd67bfc).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
internal/auth0/user/data_source.go 82.35% 4 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
- Coverage   89.20%   89.19%   -0.02%     
==========================================
  Files         134      134              
  Lines       18329    18355      +26     
==========================================
+ Hits        16351    16371      +20     
- Misses       1399     1403       +4     
- Partials      579      581       +2     
Files with missing lines Coverage Δ
internal/auth0/user/data_source.go 87.61% <82.35%> (-3.60%) ⬇️

... and 2 files with indirect coverage changes

@duedares-rvj duedares-rvj self-assigned this Feb 5, 2025
@duedares-rvj duedares-rvj marked this pull request as ready for review February 11, 2025 03:32
@duedares-rvj duedares-rvj requested a review from a team as a code owner February 11, 2025 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for User data_source by email
2 participants